let http = require("https")

let util = require("util")

http.get("https://www.imooc.com/search/hotwords",(res) => {
	const {statusCode} = res;
	const contentTyep = res.headers["content-type"]
	console.log("statusCode:",statusCode)
	let data = ''
	res.on("data",(chunk)=>{
		data+=chunk
		
	});
	res.on("end",()=>{
		let result = JSON.parse(data);
		console.log(result.data)
		console.log("result:",util.inspect(result))

	})

})